<%@tag pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@attribute name="item" required="true" type="cn.livingCloud.dto.ButtonDto" %>

<c:if test="${not empty item.parentId}">
    <td style="padding-left: 60px">${item.name}</td>
</c:if>
<c:if test="${empty item.parentId}">
    <td>${item.name}</td>
</c:if>
<td>
    <span class="label label-primary">${item.type}</span>
</td>
<td>
    ${item.key}
</td>
<td>
    ${item.shortUrl}
</td>
<td>
    <span class="label label-success">${item.createTime}</span>
</td>
<td>
    <c:if test="${empty item.parentId}">
        <a class="btn btn-warning" href="${contextPath}/admin/wechat/edit_button.htm?uuid=${item.uuid}">编辑</a>
        <c:if test="${item.showAddSub}">
            <a class="btn btn-primary"
               href="${contextPath}/admin/wechat/edit_button.htm?parent_id=${item.uuid}">新增二级按钮</a>
        </c:if>
        <input type="hidden" name="uuid" value="${item.uuid}">
        <a class="btn btn-danger" href="${contextPath}/admin/wechat/delete_button.htm?uuid=${item.uuid}"
           onclick="javascript:return confirm('确定删除按钮:[${item.name}]吗?');">
            删除
        </a>
    </c:if>
    <c:if test="${not empty item.parentId}">
        <a class="btn btn-warning" href="${contextPath}/admin/wechat/edit_button.htm?uuid=${item.uuid}">编辑</a>
        <input type="hidden" name="uuid" value="${item.uuid}">
        <a class="btn btn-danger" href="${contextPath}/admin/wechat/delete_button.htm?uuid=${item.uuid}"
           onclick="javascript:return confirm('确定删除按钮:[${item.name}]吗?');">
            删除
        </a>
    </c:if>

</td>

